<!-- 发布文章 -->
<template>
<!--  <div class="m-container">-->
<!--    <div class="m-content">-->
<!--      <mavon-editor v-model="editForm.content"/>-->
<!--    </div>-->
<!--  </div>-->
  <div id="Box">
    <div class="from">
      <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="140px" class="demo-ruleForm">
        <!-- 昵称 -->
        <el-form-item label="标题" prop="title">
          <el-input style="width: 400px;display: flex" v-model="ruleForm.title"></el-input>
        </el-form-item>
        <!-- 学院 -->
        <el-form-item label="标签" prop="lable">
          <el-select style="display: flex;width: 200px;" v-model="ruleForm.lable" placeholder="选择你想添加的标签">
            <el-option label="Java" value="xinshang"></el-option>
            <el-option label="Vue" value="caijing"></el-option>
            <el-option label="JavaWeb" value="gongshang"></el-option>
            <el-option label="UI" value="jianyi"></el-option>
            <el-option label="Photoshop" value="waiyu"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </div>
    <div class="m-container" style="width: 452px;margin-left: 90px">
      <TEditor ref="editor" v-model="value" />
    </div>
  </div>
</template>
<script>

export default {
  name: 'm-container',
  data () {
    return {
      ruleForm: {
        title: '',
        lable: ''
      },
      rules: {
        title: [
          {
            required: true,
            message: '请输入标题',
            trigger: 'blur'
          },
          {
            min: 1,
            max: 50,
            message: '字数不能超过50个字符',
            trigger: 'blur'
          }
        ],
        lable: [
          {
            required: true,
            message: '请选择你想要添加的标签',
            trigger: 'change'
          }
        ]
      },
      isPreview: false,
      selectEditor: 0,
      editForm: {
        content: '1'
      }
    }
  }
}
</script>
<style>
#Box{
  display: flex;
  flex-direction: column;
  align-content: space-around;
  padding: 20px 0;
  background-color: white;
}
</style>
